from django.urls import path
from . import views
from django.conf.urls import url
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
    path('', views.index,name="index"),
    path('add/',views.addUser,name="add"),
    path('del/<str:username>',views.delUser,name="del"),
    path('up/<str:username>,<str:password>',views.upUser,name="up"),
    path('select/<str:username>',views.selectUser,name="select"),
    path('all/',views.allUser,name="all"),
    path('login/<str:username>,<str:pwd>', views.loginUser, name="login"),
    url(r'^admin/', admin.site.urls),
    url(r'^upload', views.uploadImg),
    url(r'^showImg', views.showImg),
    url(r'^show', views.show),

                  # path('book/',views.books,name="books")
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

#url开始为上传图片功能的地址
#static为静态资源地址